﻿using System;

namespace DotNetCommon.Validate.Annotations;

/// <summary>
/// 表示出现在错误提示中的属性名称, 示例:
/// <code>
/// [VDisplayName("姓名")]
/// [VNotNullOrWhiteSpace]
/// public string Name { get; set; }
/// </code>
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public class VDisplayNameAttribute(string name) : Attribute
{
    public string Name { get; set; } = name;
}
